import { h } from 'vue'
import {callConfirmMethod} from '@/common/layer-com-utils.js'
import addComponent from '../food-withdraw-list/add.vue'

/**
 * 发起提现操作
 */
function layerAddWithdraw(){
    let confirmMethod=[];
    layer.open({
        title:`商户提现`,
        type:1,
        area:[`550px`,`480px`],
        content:h(addComponent,{
            callback:(arrayFn)=>confirmMethod=arrayFn
        }), 
        appContext:getApp().$vm.$.appContext,
        shade: true, 
        shadeClose:false,
        btn: [{
            text:`确认提现`, 
            callback: (layerId) =>callConfirmMethod.call(this,confirmMethod[0],layerId)
        },{
            text:`取消关闭`, 
            callback: (layerId) =>callConfirmMethod.call(this,confirmMethod[1],layerId)
        }]
    })
}

export default {
    layerAddWithdraw
}

